<?php
	require_once "admin_header.php";
	$data=new Database;
	$sql="select * from thongtinlienhe order by trangthai asc";
	$data->query($sql);
	while($row=$data->fetch())
	{
		$dt[]=$row;
	}
?>
<script type="text/javascript" language="javascript">
	page=6;
</script>
<div class="heading">
    <a>thông báo</a>
</div>
<div class="content_page">
	<div class="ds">
        <table border="1">
            <tr>
                <th>STT</th>
                <th>Họ Tên</th>
                <th>Email</th>
                <th>Điện Thoại</th>
                <th>Loại Liên Hệ</th>
                <th>Xem</th>
                <th> Xóa</th>
            </tr>
            <?php
			$stt=0;
			foreach($dt as $item)
			{
				$stt++;
				if($item['trangthai']==0)
				{
					$st="style='font-weight:bold'";
				}
				else
					$st="";
					
				echo "<tr $st>";
				echo "<td class='list_pq'>$stt</td><td>$item[hoten]</td><td>$item[email]</td><td> $item[dienthoai]</td><td>$item[loaiLH]</td><td class='list_pq'><a href='xemthongbao.php?id=$item[id]'>Xem</td><td class='list_pq'><a href='libraries/xoa_thongbao.php?id=$item[id]'>Xóa</a></td>";
				echo "</tr>";
			}
			?>
         </table>
     </div>
 </div>
<?php
	require_once "admin_footer.php";
?>

                	
                
